<%--
  Created by IntelliJ IDEA.
  User: Lenovo
  Date: 2025/5/4
  Time: 16:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ page import="com.project.DB_User" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%
    String uid = request.getParameter("uid");
    List<String> deleteInput = new ArrayList<>();
    deleteInput.add(uid);

    DB_User dbUser = new DB_User();
    boolean deleteResult = dbUser.delete(deleteInput);

    if (deleteResult) {
        response.sendRedirect("index.jsp");
    } else {
        out.println("删除用户失败");
    }
%>